package net.comm.group.db;


import java.sql.ResultSet;
import java.sql.SQLException;


import net.comm.group.bean.BaseGAlbum;
import net.comm.group.bean.BaseGFollForum;
import net.comm.group.bean.BaseGForum;
import net.comm.group.bean.BaseGMember;
import net.comm.group.bean.BaseGPicture;
import net.comm.group.bean.BaseGroups;
import net.comm.oper.bean.Baseoperlog;
import net.comm.util.StringUtil;

import org.sakaiproject.db.api.SqlReader;

public class DbGMemberService implements SqlReader
{

	/**
	 * Read from the result one set of fields to create a Resource.
	 * 
	 * @param result
	 *        The Sql query result.
	 * @return The Resource object.
	 */
	public Object readSqlResultRecord(ResultSet result)
	{
		try
		{
			
			int  	GroupID = result.getInt(1);	//
			int  	UserID = result.getInt(2);		//
			int  	TeamID = result.getInt(3);								//好友所在组
			String  Type = StringUtil.getValue(result.getString(4));		//
			String  CTime = StringUtil.getValue(result.getString(5));		//
			String  Status = StringUtil.getValue(result.getString(6));		//
			String  MTime = StringUtil.getValue(result.getString(7));		//
			
			// create the Resource from these fields
			return new BaseGMember( GroupID,UserID, TeamID,Type,CTime,Status,MTime);
		}
		catch (SQLException e)
		{
			return null;
		}
		
	}
}
